.class public Lcom/estrongs/android/taskmanager/widget/TmUpdateService;
.super Landroid/app/Service;


# instance fields
.field private a:Ljava/util/Timer;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;)Ljava/util/Timer;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    return-object v0
.end method


# virtual methods
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 1

    const/4 v0, 0x0

    return-object v0
.end method

.method public onCreate()V
    .locals 1

    invoke-super {p0}, Landroid/app/Service;->onCreate()V

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    return-void
.end method

.method public onDestroy()V
    .locals 0

    invoke-super {p0}, Landroid/app/Service;->onDestroy()V

    return-void
.end method

.method public onStart(Landroid/content/Intent;I)V
    .locals 11

    const-wide/16 v9, 0x1

    const-string v0, "_id"

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v6

    invoke-static {p0}, Landroid/appwidget/AppWidgetManager;->getInstance(Landroid/content/Context;)Landroid/appwidget/AppWidgetManager;

    move-result-object v7

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/ht;->h(Landroid/content/Context;)I

    move-result v8

    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    new-instance v1, Lcom/estrongs/android/taskmanager/widget/a;

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, p0, v2, v7, v6}, Lcom/estrongs/android/taskmanager/widget/a;-><init>(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;Landroid/content/Context;Landroid/appwidget/AppWidgetManager;I)V

    const-wide/16 v2, 0x1

    int-to-long v4, v8

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->scheduleAtFixedRate(Ljava/util/TimerTask;JJ)V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    new-instance v1, Lcom/estrongs/android/taskmanager/widget/a;

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, p0, v2, v7, v6}, Lcom/estrongs/android/taskmanager/widget/a;-><init>(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;Landroid/content/Context;Landroid/appwidget/AppWidgetManager;I)V

    int-to-long v4, v8

    move-wide v2, v9

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->scheduleAtFixedRate(Ljava/util/TimerTask;JJ)V

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a:Ljava/util/Timer;

    goto :goto_0
.end method
